package cn.jinhaze.controller.user;

import cn.jinhaze.common.pojo.dto.DishPageDTO;
import cn.jinhaze.common.pojo.vo.DishVO;
import cn.jinhaze.common.result.Result;
import cn.jinhaze.service.DishService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: L29
 * @create: 2024-12-24 20:36
 * @Version 1.0
 */
@RequestMapping("/user/dish")
@RestController
@Tag(name = "用户菜品查询", description = "用户菜品相关接口")
public class UserDishController {
	@Autowired
	private DishService dishService;

	@PostMapping("/list")
	@Operation(summary = "获取菜品列表")
	public Result<List<DishVO>> list(@RequestBody DishPageDTO dishPageDTO) {
		dishPageDTO.setStatus(1);
		return Result.success(dishService.list(dishPageDTO));
	}


}